package com.tony.study.PenTest;

/**
 * Created with IntelliJ IDEA.
 *
 * @Title: HaiDingabc
 * @Auther: 皮蛋布丁
 * @Date: 2021/11/01/22:11
 * @Description: 海鼎科技笔试题
 */
public class HaiDingabc {

    public static void main(String[] args) {
        SubSubClass result = new SubSubClass(10,20,30);
        result.show();
    }
}
class SuperClass {
    int a,b;
    SuperClass(int aa,int bb) {
        a = aa;
        b = bb;
    }
    void show() {
        System.out.println("a=" +a + "\n b=" + b);
    }
}
class SubClass extends SuperClass {
    int c;
    SubClass(int aa, int bb,int cc) {
        super(aa, bb);
        c = cc;
    }
}
class SubSubClass extends SubClass {
    int a;
    SubSubClass(int aa, int bb, int cc) {
        super(aa, bb, cc);
        a = aa + bb + cc;
    }
    void show() {
        System.out.println("a=" + a + "\nb=" + b + "\nc=" + c);
    }
}
